<?php

include '../DB/dbConnection.php';

$result=array();

if ($_POST){
	$id=0;
	$e="";
		
	$stmt = $conn->prepare("INSERT INTO teachers (id,empno,name,dob,eployment_date,position,adhar,gender,maritial_status,image,cell_number,landline,email,village,city,district,state,zip,address,degree,certificate,experience,school_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
	$stmt->bind_param("issssssssssssssssissssi",$id,$_POST['empno'],$_POST['name'],$e,$_POST['eployment_date'],$_POST['position'],$e,$_POST['gender'],$e,$e,$e,$e,$e,$e,$e,$e,$e,$e,$e,$e,$e,$e,$_POST['school_id']);
	$success = $stmt->execute();
	$stmt->close();
	$conn->close();
	
	if($success)
		$result['error']='false';
	else
		$result['error']='true';
}
else
{
	$result['error']='true';
}

echo json_encode($result);
?> 
